home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / other / jikes / src / op.h < prev    next >
C/C++ Source or Header  |  1999-05-14  |  5KB  |  229 lines

  1. // $Id: op.h,v 1.3 1999/01/25 20:00:31 shields Exp $
  2. //
  3. // This software is subject to the terms of the IBM Jikes Compiler
  4. // License Agreement available at the following URL:
  5. // http://www.ibm.com/research/jikes.
  6. // Copyright (C) 1996, 1998, International Business Machines Corporation
  7. // and others.  All Rights Reserved.
  8. // You must accept the terms of that agreement to use this software.
  9. //
  10. #ifndef op_INCLUDED
  11. #define op_INCLUDED
  12.  
  13. #include "config.h"
  14. #include "tuple.h"
  15.  
  16. // code dealing with describing and listing byte code
  17.  enum operators {
  18.     OP_NOP=0x00,
  19.     OP_ACONST_NULL=0x01,
  20.     OP_ICONST_M1=0x02,
  21.     OP_ICONST_0=0x03,
  22.     OP_ICONST_1=0x04,
  23.     OP_ICONST_2=0x05,
  24.     OP_ICONST_3=0x06,
  25.     OP_ICONST_4=0x07,
  26.     OP_ICONST_5=0x08,
  27.     OP_LCONST_0=0x09,
  28.     OP_LCONST_1=0x0a,
  29.     OP_FCONST_0=0x0b,
  30.     OP_FCONST_1=0x0c,
  31.     OP_FCONST_2=0x0d,
  32.     OP_DCONST_0=0x0e,
  33.     OP_DCONST_1=0x0f,
  34.     OP_BIPUSH=0x10,
  35.     OP_SIPUSH=0x11,
  36.     OP_LDC=0x12,
  37.     OP_LDC_W=0x13,
  38.     OP_LDC2_W=0x14,
  39.     OP_ILOAD=0x15,
  40.     OP_LLOAD=0x16,
  41.     OP_FLOAD=0x17,
  42.     OP_DLOAD=0x18,
  43.     OP_ALOAD=0x19,
  44.     OP_ILOAD_0=0x1a,
  45.     OP_ILOAD_1=0x1b,
  46.     OP_ILOAD_2=0x1c,
  47.     OP_ILOAD_3=0x1d,
  48.     OP_LLOAD_0=0x1e,
  49.     OP_LLOAD_1=0x1f,
  50.     OP_LLOAD_2=0x20,
  51.     OP_LLOAD_3=0x21,
  52.     OP_FLOAD_0=0x22,
  53.     OP_FLOAD_1=0x23,
  54.     OP_FLOAD_2=0x24,
  55.     OP_FLOAD_3=0x25,
  56.     OP_DLOAD_0=0x26,
  57.     OP_DLOAD_1=0x27,
  58.     OP_DLOAD_2=0x28,
  59.     OP_DLOAD_3=0x29,
  60.     OP_ALOAD_0=0x2a,
  61.     OP_ALOAD_1=0x2b,
  62.     OP_ALOAD_2=0x2c,
  63.     OP_ALOAD_3=0x2d,
  64.     OP_IALOAD=0x2e,
  65.     OP_LALOAD=0x2f,
  66.     OP_FALOAD=0x30,
  67.     OP_DALOAD=0x31,
  68.     OP_AALOAD=0x32,
  69.     OP_BALOAD=0x33,
  70.     OP_CALOAD=0x34,
  71.     OP_SALOAD=0x35,
  72.     OP_ISTORE=0x36,
  73.     OP_LSTORE=0x37,
  74.     OP_FSTORE=0x38,
  75.     OP_DSTORE=0x39,
  76.     OP_ASTORE=0x3a,
  77.     OP_ISTORE_0=0x3b,
  78.     OP_ISTORE_1=0x3c,
  79.     OP_ISTORE_2=0x3d,
  80.     OP_ISTORE_3=0x3e,
  81.     OP_LSTORE_0=0x3f,
  82.     OP_LSTORE_1=0x40,
  83.     OP_LSTORE_2=0x41,
  84.     OP_LSTORE_3=0x42,
  85.     OP_FSTORE_0=0x43,
  86.     OP_FSTORE_1=0x44,
  87.     OP_FSTORE_2=0x45,
  88.     OP_FSTORE_3=0x46,
  89.     OP_DSTORE_0=0x47,
  90.     OP_DSTORE_1=0x48,
  91.     OP_DSTORE_2=0x49,
  92.     OP_DSTORE_3=0x4a,
  93.     OP_ASTORE_0=0x4b,
  94.     OP_ASTORE_1=0x4c,
  95.     OP_ASTORE_2=0x4d,
  96.     OP_ASTORE_3=0x4e,
  97.     OP_IASTORE=0x4f,
  98.     OP_LASTORE=0x50,
  99.     OP_FASTORE=0x51,
  100.     OP_DASTORE=0x52,
  101.     OP_AASTORE=0x53,
  102.     OP_BASTORE=0x54,
  103.     OP_CASTORE=0x55,
  104.     OP_SASTORE=0x56,
  105.     OP_POP=0x57,
  106.     OP_POP2=0x58,
  107.     OP_DUP=0x59,
  108.     OP_DUP_X1=0x5a,
  109.     OP_DUP_X2=0x5b,
  110.     OP_DUP2=0x5c,
  111.     OP_DUP2_X1=0x5d,
  112.     OP_DUP2_X2=0x5e,
  113.     OP_SWAP=0x5f,
  114.     OP_IADD=0x60,
  115.     OP_LADD=0x61,
  116.     OP_FADD=0x62,
  117.     OP_DADD=0x63,
  118.     OP_ISUB=0x64,
  119.     OP_LSUB=0x65,
  120.     OP_FSUB=0x66,
  121.     OP_DSUB=0x67,
  122.     OP_IMUL=0x68,
  123.     OP_LMUL=0x69,
  124.     OP_FMUL=0x6a,
  125.     OP_DMUL=0x6b,
  126.     OP_IDIV=0x6c,
  127.     OP_LDIV=0x6d,
  128.     OP_FDIV=0x6e,
  129.     OP_DDIV=0x6f,
  130.     OP_IREM=0x70,
  131.     OP_LREM=0x71,
  132.     OP_FREM=0x72,
  133.     OP_DREM=0x73,
  134.     OP_INEG=0x74,
  135.     OP_LNEG=0x75,
  136.     OP_FNEG=0x76,
  137.     OP_DNEG=0x77,
  138.     OP_ISHL=0x78,
  139.     OP_LSHL=0x79,
  140.     OP_ISHR=0x7a,
  141.     OP_LSHR=0x7b,
  142.     OP_IUSHR=0x7c,
  143.     OP_LUSHR=0x7d,
  144.     OP_IAND=0x7e,
  145.     OP_LAND=0x7f,
  146.     OP_IOR=0x80,
  147.     OP_LOR=0x81,
  148.     OP_IXOR=0x82,
  149.     OP_LXOR=0x83,
  150.     OP_IINC=0x84,
  151.     OP_I2L=0x85,
  152.     OP_I2F=0x86,
  153.     OP_I2D=0x87,
  154.     OP_L2I=0x88,
  155.     OP_L2F=0x89,
  156.     OP_L2D=0x8a,
  157.     OP_F2I=0x8b,
  158.     OP_F2L=0x8c,
  159.     OP_F2D=0x8d,
  160.     OP_D2I=0x8e,
  161.     OP_D2L=0x8f,
  162.     OP_D2F=0x90,
  163.     OP_I2B=0x91,
  164.     OP_I2C=0x92,
  165.     OP_I2S=0x93,
  166.     OP_LCMP=0x94,
  167.     OP_FCMPL=0x95,
  168.     OP_FCMPG=0x96,
  169.     OP_DCMPL=0x97,
  170.     OP_DCMPG=0x98,
  171.     OP_IFEQ=0x99,
  172.     OP_IFNE=0x9a,
  173.     OP_IFLT=0x9b,
  174.     OP_IFGE=0x9c,
  175.     OP_IFGT=0x9d,
  176.     OP_IFLE=0x9e,
  177.     OP_IF_ICMPEQ=0x9f,
  178.     OP_IF_ICMPNE=0xa0,
  179.     OP_IF_ICMPLT=0xa1,
  180.     OP_IF_ICMPGE=0xa2,
  181.     OP_IF_ICMPGT=0xa3,
  182.     OP_IF_ICMPLE=0xa4,
  183.     OP_IF_ACMPEQ=0xa5,
  184.     OP_IF_ACMPNE=0xa6,
  185.     OP_GOTO=0xa7,
  186.     OP_JSR=0xa8,
  187.     OP_RET=0xa9,
  188.     OP_TABLESWITCH=0xaa,
  189.     OP_LOOKUPSWITCH=0xab,
  190.     OP_IRETURN=0xac,
  191.     OP_LRETURN=0xad,
  192.     OP_FRETURN=0xae,
  193.     OP_DRETURN=0xaf,
  194.     OP_ARETURN=0xb0,
  195.     OP_RETURN=0xb1,
  196.     OP_GETSTATIC=0xb2,
  197.     OP_PUTSTATIC=0xb3,
  198.     OP_GETFIELD=0xb4,
  199.     OP_PUTFIELD=0xb5,
  200.     OP_INVOKEVIRTUAL=0xb6,
  201.     OP_INVOKENONVIRTUAL=0xb7,
  202.     OP_INVOKESTATIC=0xb8,
  203.     OP_INVOKEINTERFACE=0xb9,
  204.     OP_XXXUNUSEDXXX=0xba,
  205.     OP_NEW=0xbb,
  206.     OP_NEWARRAY=0xbc,
  207.     OP_ANEWARRAY=0xbd,
  208.     OP_ARRAYLENGTH=0xbe,
  209.     OP_ATHROW=0xbf,
  210.     OP_CHECKCAST=0xc0,
  211.     OP_INSTANCEOF=0xc1,
  212.     OP_MONITORENTER=0xc2,
  213.     OP_MONITOREXIT=0xc3,
  214.     OP_WIDE=0xc4,
  215.     OP_MULTIANEWARRAY=0xc5,
  216.     OP_IFNULL=0xc6,
  217.     OP_IFNONNULL=0xc7,
  218.     OP_GOTO_W=0xc8,
  219.     OP_JSR_W=0xc9,
  220.     OP_SOFTWARE=0xfe,
  221.     OP_HARDWARE=0xff
  222. };
  223. extern void opdesc (int opc, char **name, char **desc);
  224.  
  225. #include  "class.h"
  226. extern void  opdmp(Tuple<cp_info *>& constant_pool, Tuple<u1>& code);
  227.  
  228. #endif
  229.